package com.example.commonlibrary.util

import android.widget.ImageView
import androidx.databinding.BindingAdapter
import com.bumptech.glide.Glide
import com.example.commonlibrary.R

@BindingAdapter("url")
fun loadImage(imageView: ImageView, url:String?){

    Glide.with(imageView)
        .load(url)
        .error(R.drawable.error)
        .into(imageView)

}
@BindingAdapter("circle")
fun loadImagec(imageView: ImageView, url:String?){

    Glide.with(imageView)
        .load(url)
        .error(R.drawable.error)
        .circleCrop()
        .into(imageView)

}